package world.criver.mm_vworld_server.controller;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import world.criver.mm_vworld_server.service.serAdminServer;

@RestController
@RequestMapping("/admin/server")
public class conAdminServer {
    @Autowired
    private serAdminServer serAdminServer;

    @PostMapping("/start")
    public ObjectNode start(@RequestBody JsonNode info){
        return serAdminServer.start(info);
    }
    @PostMapping("/stop")
    public ObjectNode stop(@RequestBody JsonNode info){
        return serAdminServer.stop(info);
    }
    @PostMapping("/state")
    public ObjectNode state(@RequestBody JsonNode info){
        return serAdminServer.state(info);
    }
}
